home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 6_14.lha / 6_14 / tstb.c < prev    next >
Text File  |  1993-08-08  |  700b  |  32 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. include <stream.h>
  6. oid error(char *fmt)
  7.  
  8.    cout << fmt << "\n";
  9.  
  10. include "6_14b.c"
  11.  
  12. ain()
  13.  
  14.    tiny c1 = 2;
  15.    cout << "c1 = " << int(c1) << "\n";
  16.    tiny c2 = 62;
  17.    cout << "c2 = " << int(c2) << "\n";
  18.    tiny c3 = c2 - c1;
  19.    cout << "c3 = " << int(c3) << "\n";
  20.    tiny c4 = c3;
  21.    cout << "c4 = " << int(c4) << "\n";
  22.    int i = c1 + c2;
  23.    cout << "i = " << int(i) << "\n";
  24.    c1 = c2 + 2 * c1;
  25.    cout << "c1 = " << int(c1) << "\n";
  26.    c2 = c1 - i;
  27.    cout << "c2 = " << int(c2) << "\n";
  28.    c3 = c2;
  29.    cout << "c3 = " << int(c3) << "\n";
  30.    return 0;
  31.  
  32.